<table class="table table-hover">
    <thead>
    <tr>
        <th>规格</th>
        <th>属性值</th>
        <th>附加价格</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <volist name="goodsAttrData" id="gad">
        <tr>
            <td>{$gad['taname']}</td>
            <td>
                <select name="spec[{$gad['taid']}][]" id="">
                    <option value="0">请选择</option>
                    <volist name="gad.tavalue" id="v">
                        <option value="{$v}">{$v}</option>
                    </volist>
                </select>
            </td>
            <td><input type="text" name="added[{$gad['taid']}][]" id=""></td>
            <td><button type="button" onclick="add(this)" class="btn btn-success btn-xs">新增</button></td>
        </tr>
        </volist>
    </tbody>
</table>
<script>
    function add(obj){
        var $tr = $(obj).closest('tr').clone(true);
        var delBtn = '<button type="button" onclick="del(this)" class="btn btn-danger btn-xs">删除</button>'
        $tr.find('td:last').html(delBtn);
        $(obj).closest('tr').after($tr);//点按钮复制
    }
    function del(obj){
        $(obj).closest('tr').remove();
    }
</script>